const Koa=require('koa');
const app=new Koa();

const route=require('./route');

app.use(async ctx=>{
    console.log(ctx.url);
    let html=await route(ctx.url);
    console.log('html:',html);

    ctx.body=html;
});

app.listen(4000,()=>{
    console.log('Koa2 port:4000----'+new Date().toLocaleTimeString());
});